﻿#ifndef SEMAPHORE_H
#define SEMAPHORE_H

#include <mutex>

using namespace std;


class semaphore {
public:
	void down();
	void up();
	semaphore(int);
	semaphore();

private:
	mutex m;
	condition_variable cond;
	int available;
};

#endif // SEMAPHORE_H
